<!DOCTYPE html>
<script src="../../resources/run-after-layout-and-paint.js"></script>
<script src="resources/text-based-repaint.js"></script>
<script>
// Disable implicit root scroller since the iframe full screen and would
// otherwise be promoted to rootScroller which changes painting and
// invalidation.
if (window.internals)
  internals.runtimeFlags.implicitRootScrollerEnabled = false;
if (window.testRunner)
  testRunner.useUnfortunateSynchronousResizeMode();
onload = function() {
  runAfterLayoutAndPaint(function() {
    // Use smaller size because window.resizeTo/By() will fail if the size is
    // bigger than the screen size.
    window.resizeTo(500, 200);
    runRepaintAndPixelTest();
  });
};
function repaintTest() {
  window.resizeBy(0, 200);
}
</script>
Test passes if you see "Success" after window resizes.
<iframe style="position: absolute; left: 0; top: 0; border: none; height: 100%; width: 100%;"
    srcdoc="<!DOCTYPE html><div style='margin-top: 300px; max-width: 400px'><h3>Success</h3></div>"></iframe>
